Repository navigation
docs(mcpx): #4375 response-read contract + bounded embeddings error excerpt (#4376) - #8273
Conversation
…ngs error excerpt (#4376)
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 32 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
agent-note:v1 Codex gate disposition for PR #8273: the Codex code review FAILED TO RUN — its summary comment records status "failed" and the follow-up comment states the Codex usage limit for code reviews was reached. Verified fresh this shift: zero Codex review submissions and zero inline review comments exist on this PR, so there are no Codex findings to disposition — nothing is being merged past. (The review-state metadata flags has_any_findings=true for the failed run itself; no finding text was ever posted.) Substituted verification by the merging lane: diff reviewed line-by-line (embeddings.go LimitReader bound at defaults.HTTPErrorBodyLimit; defaults.go contract statement — both exactly on the #4376 acceptance). Missing test supplied in d9e124a: TestRemoteEmbedderErrorBodyBounded (oracle: contract decision 1 — a non-200 body over the limit yields an error excerpt of exactly HTTPErrorBodyLimit bytes). Targeted tests on the laptop: go test ./internal/catalog/ PASS (incl. the new test); go test ./internal/defaults/ fails only TestNoPackageRedeclaresADefault, byte-identical failure on clean main (pre-existing, flags mcpauth/testsupport lines this PR never touches). Merging under the standing criteria. |
Summary
Phase 4 (closing audit) of design #4375 — one response-read contract for mcpx's outbound calls. All three gated phases have landed (#4354, #4282 closed; #2114 closed with PR #3380 merged).
pkgs/mcpx/internal/defaults/defaults.gobesideHTTPErrorBodyLimit: the four decisions (error bodies are excerpts at the limit; a buffered success body is refused past its named cap, never silently truncated; a retained copy is truncated while the delivered stream is not; every outbound call carries a deadline as well as a byte bound), plus the audit summary.internal/catalog/embeddings.go's remote-embeddings error path read the body whole (io.ReadAll(resp.Body)); it now excerpts atdefaults.HTTPErrorBodyLimitper decision 1 — the single behaviour change this audit's acceptance allows.resp.Bodyread / buffered peer-response copy in pkgs/mcpx, each dispositioned) is recorded on Design: read it bounded — one response-read contract for mcpx's outbound calls #4375 with the closing evidence. Filed from the audit: mcpx(openapi): spec fetch truncates silently at 32MiB instead of refusing past the cap (#4375 contract decision 2) #8271 (openapi spec fetch truncates silently at its cap instead of refusing — decision 2 deviation, two sites, deliberately not fixed inside the audit).Tests
go build ./...for the mcpx module: pass; gofmt clean; diff is comment + one line.go test ./internal/catalog/— ok.go test ./internal/defaults/— FAILS onTestNoPackageRedeclaresADefault, proven pre-existing on clean main this shift (identical failure with these changes stashed; the guard flags unrelated literals in internal/mcpauth/failover.go and internal/testsupport) and filed as mcpx: TestNoPackageRedeclaresADefault red on clean main — mcpauth/failover + testsupport constants bypass defaults.json #8270, the same bug class as closed mcpx: TestNoPackageRedeclaresADefault red on clean main — execsvc/progspec constants bypass defaults.json #3085.Merge Danger
Door: two-way
Blast Radius: low
One bounded-read change on an error path plus a doc comment. No success-path behaviour changes.
Closes #4376
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.